package com.example.leetcode.string;

import com.example.leetcode.string.common.StringUtils;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

class Solution1807 {
    public String evaluate(String s, List<List<String>> knowledge) {
        return StringUtils.evaluate(s, knowledge);
    }
}

public class leetcode1807 {
    public static void main(String[] args) {
        Solution1807 solution1807 = new Solution1807();
        String s = "(name)is(age)yearsold";
        String[][] knowledge = {{"name","bob"},{"age","two"}};
        test1807(solution1807, s, knowledge);
    }

    private static void test1807(Solution1807 solution1807, String s, String[][] knowledge) {
        List<List<String>> list = new ArrayList<>();
        for(int i = 0; i< knowledge.length; i++){
            list.add(Arrays.asList(knowledge[i]));
        }
        System.out.println(solution1807.evaluate(s, list));
    }
}
